package ${content.serviceImplContent.classPackage};

 
 import java.util.Map;
import java.util.stream.Collectors;

import org.apache.dubbo.config.annotation.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import io.gzqixun.core.utils.PageUtils;
import io.gzqixun.core.utils.Query;

import ${content.serviceContent.classPackage}.${content.serviceContent.className};
import ${content.daoContent.classPackage}.${content.daoContent.className};
import ${content.entityContent.classPackage}.${content.entityContent.className};
/**
 * ${content.entityContent.description}
 * 
 * @author ${author} 
 *
 */
@Service
@DS("#header.tenantId")
public class ${content.serviceImplContent.className}   extends ServiceImpl<${content.daoContent.className}, ${content.entityContent.className}> implements ${content.serviceContent.className} {

	 @Override
	public PageUtils queryPage(Map<String, Object> params) {
		params =  params.entrySet().stream().filter(map ->  null !=map.getValue() && !"".equals(map.getValue().toString())).collect(Collectors.toMap(p->p.getKey(), p -> p.getValue()));
		IPage<${content.entityContent.className}> page = this.page(
				new Query<${content.entityContent.className}>().getPage(params),
				new QueryWrapper<${content.entityContent.className}>()
					.like(params.containsKey("remark"),"remark", params.get("remark"))
					.orderByDesc("created"));
		return new PageUtils(page);
	}


}